package com.difsonapps.contacttranslator.dto;

public enum EmailTypeEnum {
	HOME(0), WORK(1),OTHER(2),CUSTOM(3);

	private int code;

	private EmailTypeEnum(int code) {
		this.code = code;
	}

	public static EmailTypeEnum getDefault() {
		return EmailTypeEnum.HOME;
	}

	public int getCode() {
		return code;
	}

	public static EmailTypeEnum get(int code) {
		switch (code) {
		case 0:
			return HOME;
		case 1:
			return WORK;
		case 2:
			return OTHER;
		case 3:
			return CUSTOM;
		}
		return HOME;
	}
}
